package com.hnhy.hnhyscms_ws.service.impl;

import com.hnhy.hnhyscms_ws.entity.OrDetails;
import com.hnhy.hnhyscms_ws.dao.IOrDetailsDao;
import com.hnhy.hnhyscms_ws.service.IOrDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrDetailsService implements IOrDetailsService {
    @Autowired
    private IOrDetailsDao iOrDetailsDao;

    @Override
    public List<OrDetails> getByOrderNo(String orderNo) {
        return iOrDetailsDao.getByOrderNo(orderNo);
    }

    @Override
    public List<OrDetails> countByCustomerNo(String customerNo) {
        return iOrDetailsDao.countByCustomerNo(customerNo);
    }

    @Override
    public List<OrDetails> getAllOrderDetails() { return iOrDetailsDao.getAllOrderDetails(); }

    @Override
    public void addOrDetails(OrDetails orderDetail) {
        iOrDetailsDao.addOrDetails(orderDetail);
        return; }
}
